package com.codeplex.kartbazi;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
import android.widget.ImageView;

/**
 * Created by khadijeh on 9/6/13.
 */
public class MainActivity extends Activity implements View.OnClickListener, Animation.AnimationListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        setContentView(R.layout.menu);
        //set OnClickListeners
        ImageView image_view1 = (ImageView) findViewById(R.id.type1);
        image_view1.setOnClickListener(this);
        ImageView image_view2 = (ImageView) findViewById(R.id.type2);
        image_view2.setOnClickListener(this);
        ImageView image_view3 = (ImageView) findViewById(R.id.type3);
        image_view3.setOnClickListener(this);


    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.type1:
                Intent i1 = new Intent("com.codeplex.kartbazi.CardGameActivity");
                i1.putExtra("type", "0");
                startActivity(i1);
                break;
            case R.id.type2:
                Intent i2 = new Intent("com.codeplex.kartbazi.CardGameActivity");
                i2.putExtra("type", "1");
                startActivity(i2);
                break;
            case R.id.type3:
                Intent i3 = new Intent("com.codeplex.kartbazi.CardGameActivity");
                i3.putExtra("type", "2");
                startActivity(i3);
                break;
            default:
                break;
        }

    }

    @Override
    public void onAnimationStart(Animation animation) {

    }

    @Override
    public void onAnimationEnd(Animation animation) {

    }

    @Override
    public void onAnimationRepeat(Animation animation) {

    }
}
